<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('专家变动详情列表')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row" id="zhuanjiabiandongdetail">

            <!--登录信息-->
            <input name="userid" th:value="${session.userid}" type="hidden" id="userid">
            <input name="username" th:value="${session.username}" type="hidden" id="username">
            <input name="deptid" th:value="${session.deptid}" type="hidden" id="deptid">
            <input name="olddeptid" th:value="${session.olddeptid}" type="hidden" id="olddeptid">

            <!--变动申报-->
            <div v-if="!isqushishow">
                <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>专家名称：</label>
                                <input type="text" name="zhuanjiamingcheng" v-model="zhuanjiamingcheng"/>
                            </li>
                            <li style="width:300px;">
                                <label>变动类型：</label>
                                <select name="biandongleixing" th:with="type=${@dict.getType('sys_zhuanjiazhuangtai')}" v-model="biandongleixing" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>变动日期：</label>
                                <input type="text" class="" placeholder="请选择变动日期" name="biandongriqi" id="biandongriqi_chaxun" v-model="biandongriqi" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" @blur="getDate_chaxun"/>
                            </li>
                            <li>
                                <a class="btn btn-success btn-rounded btn-md" @click="bindBiandongList"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-md" @click="refresh"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

                <div class="col-sm-12 select-table table-striped">

                <div class="btn-group-md" id="toolbar" role="group" style="height: 50px;line-height: 50px;">
                    <a class="btn btn-primary btn-rounded btn-md" @click="toAdd()">
                        <i class="fa fa-plus"></i> 添加
                    </a>
                    <a class="btn btn-success btn-rounded btn-md" @click="wubiandongqueren()">
                        确认本批次申报的专家变动
                    </a>
                    <span v-if="checkQuerenData==1" style="color: green;margin-left: 20px;">本批次专家变动申报已确认</span>
                    <span v-else-if="checkQuerenData==0" style="color: red;margin-left: 20px;">本批次专家变动申报未确认</span>
                </div>

                <table class="table table-hover table-primary table-striped">
                    <thead>
                        <tr>
                            <th style="text-align: center; vertical-align: middle;">序号</th>
                            <th style="text-align: center; vertical-align: middle;">专家姓名</th>
                            <!--<th style="text-align: center; vertical-align: middle;">证件类型</th>-->
                            <th style="text-align: center; vertical-align: middle;">证件号码</th>
                            <th style="text-align: center; vertical-align: middle;">入选年份</th>
                            <th style="text-align: center; vertical-align: middle;">出生日期</th>
                            <th style="text-align: center; vertical-align: middle;">变动类型</th>
                            <th style="text-align: center; vertical-align: middle;">变动日期</th>
                            <th style="text-align: center; vertical-align: middle;">说明</th>
                            <th style="text-align: center; vertical-align: middle;">审核结果</th>
                            <th style="text-align: center; vertical-align: middle;">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(biandongitem,index) in biandonglist"  v-if="biandonglist.length > 0">
                            <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.zhuanjiamingcheng"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text="biandongitem.zhengjianleixing_text"></td>-->
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.zhengjianhaoma"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.ruxuannianfen"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.chushengriqi"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.biandongleixing_text"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.biandongriqi"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="biandongitem.shuoming"></td>
                            <td style="vertical-align: middle; text-align: center;color:green;" v-if="biandongitem.beizhu1=='1'">通过</td>
                            <td style="vertical-align: middle; text-align: center;color:red;" v-else-if="biandongitem.beizhu1=='2'">不通过</td>
                            <td style="vertical-align: middle; text-align: center;color:red;" v-else></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="">
                                <button v-if="biandongitem.isqidong==0||biandongitem.isqidong==null" class="btn btn-warning btn-rounded btn-md" @click="toModify(biandongitem.id)">修改</button>
                                <button v-if="biandongitem.isqidong==0||biandongitem.isqidong==null" class="btn btn-danger btn-rounded btn-md" @click="Delete(biandongitem.id)">删除</button>
                                <button v-if="biandongitem.isqidong==0||biandongitem.isqidong==null" class="btn btn-primary btn-rounded btn-md" @click="Submit(biandongitem.id)">提交</button>
                                <button v-if="biandongitem.isqidong==1" class="btn btn-info btn-rounded btn-md" @click="showShenhejiluModel(biandongitem.shiwuid)">审核进度</button>
                            </td>
                        </tr>
                        <tr v-if="biandonglist.length == 0">
                            <td style="text-align: center; vertical-align: middle" colspan="12">查无数据</td>
                        </tr>
                    </tbody>
                </table>

                <div v-if="recordCount != '0'" class="my-page-navigation" style="text-align:center;">
                    <button class="btn btn-default" @click="firstPage">首页</button>
                    <button class="btn btn-default" @click="prePage">上一页</button>
                    <select class="custom-select border-secondary" v-model="pagesize">
                        <option value="10">10 条/页</option>
                        <option value="20">20 条/页</option>
                        <option value="30">30 条/页</option>
                        <option value="50">50 条/页</option>
                    </select>
                    <span v-text="pageindex + '  /  ' + pageCount" style="border-color: #6c757d"></span>
                    <span v-text="'共' + recordCount + '条'" style="border-color: #6c757d"></span>
                    <button class="btn btn-default" @click="nextPage">下一页</button>
                    <button class="btn btn-default" @click="lastPage">尾页</button>
                    <span style="border-color: #6c757d">跳到第</span>
                    <input type="text" class="form-control border-secondary" style="width:50px;display:inline;" v-model="targetpage" @keyup.enter="targetPage">
                    <span style="border-color: #6c757d">页</span>
                    <button class="btn btn-default" @click="targetPage">跳</button>
                </div>
                </div>
            </div>

            <!--去世待核查-->
            <div v-if="isqushishow">
                <div class="col-sm-12 search-collapse">
                    <form id="formId2">
                        <div class="select-list">
                            <ul>
                                <li>
                                <label>专家姓名：</label>
                                <input type="text"  v-model="qushi.zhuanjiaxingming"/>
                            </li>
                                <li>
                                    <label style="width: 100px">特贴管理单位：</label>
                                    <input type="text"  v-model="qushi.danweimingcheng"/>
                                </li>
                                <li>
                                    <label style="width: 120px">特贴管理单位层级：</label>
                                    <select v-model="qushi.danweicengji" class="form-control" type="text">
                                        <option value="">请选择</option>
                                        <option value="1">一级单位</option>
                                        <option value="2">二级单位</option>
                                        <option value="3">三级单位</option>
                                    </select>
                                </li>
                                <li>
                                    <label>工作单位：</label>
                                    <input type="text" v-model="qushi.gongzuodanwei"/>
                                </li>
                                <li>
                                    <label>是否处理：</label>
                                    <select  @change="bindQushiList" class="form-control" v-model="qushi.shifouchuli">
                                        <option selected value="">全部</option>
                                        <option value="0">待处理</option>
                                        <option value="1">已处理</option>
                                    </select>
                                </li>
<!--                                <li>
                                    <label>处理日期：</label>
                                    <input type="text" class="" placeholder="请选择处理日期" name="chuliriqi" id="chuliriqi"
                                           v-model="qushi.chuliriqi" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                           @blur="getDate_chuliriqi"/>

                                </li>-->
                                <li>
                                    <a class="btn btn-success btn-rounded btn-md" @click="bindQushiList"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                    <a class="btn btn-warning btn-rounded btn-md" @click="refresh"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                                </li>
                            </ul>
                        </div>
                    </form>
                </div>

                <div class="col-sm-12 select-table table-striped">
                <table class="table table-hover table-primary table-striped">
                    <thead>
                    <tr>
                        <th style="text-align: center; vertical-align: middle;">序号</th>
                        <th style="text-align: center; vertical-align: middle;">专家姓名</th>
                        <th style="text-align: center; vertical-align: middle;">特贴管理单位</th>
                        <th style="text-align: center; vertical-align: middle;">特贴管理单位层级</th>
                        <th style="text-align: center; vertical-align: middle;">工作单位</th>
                        <th style="text-align: center; vertical-align: middle;">是否处理</th>
<!--                        <th style="text-align: center; vertical-align: middle;">处理日期</th>
                        <th style="text-align: center; vertical-align: middle;">处理结果</th>
                        <th style="text-align: center; vertical-align: middle;">说明</th>
                        <th style="text-align: center; vertical-align: middle;">添加时间</th>-->
                        <th style="text-align: center; vertical-align: middle;">详细信息</th>
                        <th style="text-align: center; vertical-align: middle;">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(qushiitem,index) in qushilist"  v-if="qushilist.length > 0">
                        <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.xingming"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.suoshudanwei"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.jigoujibie"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.gongzuodanwei"></td>
                        <td style="vertical-align: middle; text-align: center;" :class="qushiitem.shifouchuli==0?'red':'green'" v-text="qushiitem.shifouchuli==0?'待处理':'已处理'"></td>
<!--                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.chuliriqi"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.chulijieguo"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.shuoming"></td>
                        <td style="vertical-align: middle; text-align: center;" v-text="qushiitem.addtime"></td>-->
                        <td style="vertical-align: middle; text-align: center;">
                            <button class="btn-primary btn btn-rounded" @click="toLianxifangshi(qushiitem)">查看</button>
                        </td>
                        <td style="vertical-align: middle; text-align: center;" >
                            <button  class="btn btn-warning btn-rounded btn-md" @click="toModify(qushiitem.biandongid)">处理</button>
                            <button  class="btn btn-primary btn-rounded btn-md" @click="Submit(qushiitem.biandongid)">提交</button>
                        </td>
                    </tr>
                    <tr v-if="qushilist.length == 0">
                        <td style="text-align: center; vertical-align: middle" colspan="13">查无数据</td>
                    </tr>
                    </tbody>
                </table>

                <div v-if="recordCount != '0'" class="my-page-navigation" style="text-align:center;">
                    <button class="btn btn-default" @click="firstPage">首页</button>
                    <button class="btn btn-default" @click="prePage">上一页</button>
                    <select class="custom-select border-secondary" v-model="pagesize">
                        <option value="10">10 条/页</option>
                        <option value="20">20 条/页</option>
                        <option value="30">30 条/页</option>
                        <option value="50">50 条/页</option>
                    </select>
                    <span v-text="pageindex + '  /  ' + pageCount" style="border-color: #6c757d"></span>
                    <span v-text="'共' + recordCount + '条'" style="border-color: #6c757d"></span>
                    <button class="btn btn-default" @click="nextPage">下一页</button>
                    <button class="btn btn-default" @click="lastPage">尾页</button>
                    <span style="border-color: #6c757d">跳到第</span>
                    <input type="text" class="form-control border-secondary" style="width:50px;display:inline;" v-model="targetpage" @keyup.enter="targetPage">
                    <span style="border-color: #6c757d">页</span>
                    <button class="btn btn-default" @click="targetPage">跳</button>
                </div>
                </div>
            </div>
            <!-- 编辑专家变动信息 -->
            <div th:replace="system/zhuanjiabiandongdetail/modal_edit::biandong_edit"></div>

            <!--  审核记录-->
            <div th:replace="system/renwu/modal_shenhejilu::shenhejilu"></div>
            <div th:replace="/system/zhuanjiaqushiqueren/modal_lianxifangshi::lianxifangshi"></div>


        </div>
    </div>
    <th:block th:include="include :: footer" />
     <th:block th:include="include :: datetimepicker-js" />
     <script th:src="@{/js/system/zhuanjiabiandongdetail/customzhuanjiabiandongdetail.js?v=1.0}"></script>

</body>
</html>
<style>
    .green {
        color: green;
    }

    .red {
        color: red;
    }
</style>